#Aufgabe 20
shopt -s extglob
# Erstellen Sie erweiterte bash-Muster zum Testen einer Eingabe der Form:
#-	positive ganze Zahl
#	z.B. 12, +123
[[ "+123" =  +(?(+)[1-9]) ]]
#-	positive oder negative ganze Zahl
#	z.B. +12, -123, 123
[[ "-123" =  +(?(+|-)[1-9]) ]]
#-	Floating-Point-Zahl mit Nachkommastellen
#	z.B. 12, +123, -123, 1.23, -1.23, +1.234
[[ "-123.99" =  +(?(+|-)[1-9])?(.)+([1-9]) ]] +(?(+|-)[1-9])?(.)+([1-9]) ]]
#-	Floating-Point-Zahl mit Nachkommastellen und Exponent
#	z.B. 12, +123, -123, 1.23, -1.23, +1.234, 1.23E1, 0.12E-01, +1.23e5
[[ "-123.99E-3" =  +(?(+|-)[1-9])?(.)+([1-9])?([Ee]?(+|-)+([0-9])) ]]
#	nicht erlaubt ist z.B. .1, 12., E1, 1.0E



#    shopt [-pqsu] [-o] [optname ...]
 #             Toggle the values of variables controlling optional shell behavior.  With no options, or with the -p option, a list of all #settable options is
 #             displayed, with an indication of whether or not each is set.  The -p option causes output to be displayed in a form  that  may  #be  reused  as
 #             input.  Other options have the following meanings:
 #             -s     Enable (set) each optname.
 #             -u     Disable (unset) each optname.
 #             -q     Suppresses  normal output (quiet mode); the return status indicates whether the optname is set or unset.  If multiple #optname arguments
 #                    are given with -q, the return status is zero if all optnames are enabled; non-zero otherwise.
 #             -o     Restricts the values of optname to be those defined for the -o option to the set builtin.#
#
#              If either -s or -u is used with no optname arguments, the display is limited to those options which are set or  unset,  #respectively.   Unless
#              otherwise noted, the shopt options are disabled (unset) by default.#
#
#              The return status when listing options is zero if all optnames are enabled, non-zero otherwise.  When setting or unsetting #options, the return
#              status is zero unless an optname is not a valid shell option.
# extglob If set, the extended pattern matching features described above under Pathname Expansion are enabled.






